Function Reference

GUISetStyle

Changes the styles of a GUI window.

GUISetStyle ( Style [,ExStyle [, winhandle]] )

 

Parameters

style defines the style of the window. See GUI Control Styles Appendix.

Use -1 to leave it unchanged.
exStyle [optional] defines the extended style of the window. See the Extended Style Table below. -1 is the default.
Use -1 to leave it unchanged.
winhandle [optional] Windows handle as returned by GUICreate (default is the previously used window).

 

Return Value

Success: Returns 1.
Failure: Returns 0.

 

Remarks

No checking is done on style value, neither non interaction with already defined control. It is the designer responsability to take care of this compatibility.

 

Related

GUICreate, GUIGetStyle

 

Example


#include <GuiConstants.au3>
$NewStyle = False
$hWnd = GUICreate("Gui Style", 260, 100)
$Style = GUICtrlCreateButton("Set Style", 45, 50, 150, 20)
GUISetState()

While 1
    $Msg = GUIGetMsg()
    Switch $Msg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Style
            If Not $NewStyle Then
                GuiSetStyle ($WS_POPUPWINDOW + $WS_THICKFRAME, $WS_EX_CLIENTEDGE + $WS_EX_TOOLWINDOW)
                GUICtrlSetData($Style, 'Undo Style')
                $NewStyle = True
            Else
                GuiSetStyle ($WS_MINIMIZEBOX + $WS_CAPTION + $WS_POPUP + $WS_SYSMENU, 0)
                GUICtrlSetData($Style, 'Set Style')
                $NewStyle = False
            EndIf
        Case Else
    EndSwitch
WEnd